package Unused;

import GameObjects.Player;

import com.jme.input.action.InputAction;
import com.jme.input.action.InputActionEvent;
import com.jme.math.Vector3f;
import com.jme.scene.Node;


public class DriftAction extends InputAction{
	
	private Player ds;
	DriftAction(Node n)
	{
		ds = (Player)n;
	
	}
	public void performAction(InputActionEvent evt) {
	        ds.drift(evt.getTime());
	        Vector3f loc = ds.getLocalTranslation();
	        loc.addLocal(ds.getLocalRotation().getRotationColumn(2, new Vector3f(1,1,1))
	                .multLocal(ds.getVelocity() * evt.getTime()));
	        ds.setLocalTranslation(loc);
	    }

}
